package com.party.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author Caizhf
 * @date 2017年5月14日上午10:18:13
 * @version v.0.1
 * @email 1115054416@qq.com 
 *
 * <p>Description: 对产品的评论</p>
 *
 */
public class Discuss implements Serializable{
	private int did;
	private String discuss_comment_content;	//评论内容
	private Date discuss_comment_time;		//评论时间
	private User user;						//评论的用户
	private Product product;				//评论的是哪一款商品
	
	public int getDid() {
		return did;
	}
	public void setDid(int did) {
		this.did = did;
	}
	public String getDiscuss_comment_content() {
		return discuss_comment_content;
	}
	public void setDiscuss_comment_content(String discuss_comment_content) {
		this.discuss_comment_content = discuss_comment_content;
	}
	public Date getDiscuss_comment_time() {
		return discuss_comment_time;
	}
	public void setDiscuss_comment_time(Date discuss_comment_time) {
		this.discuss_comment_time = discuss_comment_time;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + did;
		result = prime * result + ((discuss_comment_content == null) ? 0 : discuss_comment_content.hashCode());
		result = prime * result + ((discuss_comment_time == null) ? 0 : discuss_comment_time.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Discuss other = (Discuss) obj;
		if (did != other.did)
			return false;
		if (discuss_comment_content == null) {
			if (other.discuss_comment_content != null)
				return false;
		} else if (!discuss_comment_content.equals(other.discuss_comment_content))
			return false;
		if (discuss_comment_time == null) {
			if (other.discuss_comment_time != null)
				return false;
		} else if (!discuss_comment_time.equals(other.discuss_comment_time))
			return false;
		return true;
	}
	
	
}
